%=========================================================================
%% Description modeFinderRun

%Open parallel Matlab toolbox
parpool

clear all; home
cucd=pwd;
flags.quit=0;
flags.unix=isunix;
flags.makeLocalCopy =1;
warning('on');
%dbclear all; 

%Add paths
addpath(genpath('lmjtoolbox'))
addpath(genpath('BFM_mod'))

% Begin User Inputs 
%% 1.a .onscreen== 1 
%
%   will prompt you after each major step prior to estimation 

%% 1.b .checkReport==1
% 
%   will check all variables requested in report are correct 
flags.onscreen      = 0;
flags.checkReport   = 1;

%% 2. parallel
% Define If running Parallel and if so, in Miyajima, Quincy or Desktop 
%
% If flags.quincy==0 && flags.desktop==0 then it assume Miyajima
flags.parallel=1;  % Set = 1 if running parallel

flags.quincy  =0; 
flags.desktop =0; 

%% 3. Determine what to run 
%
%% 3.a locations 
%
% Name of the folder should be 
% root \ specification \ subfolder
%
% Model name is *automatically* determined to be 
% *mod<root><specification>.m*
%
% e.g. for the example below the model is modBMJDtr 
% and the prior and settings file will be picked from 
% '\BMJ\Dtr\laborFPFW noCorrel' 

location.root='BFM_mod';
                        
location.specification='ver01';  
%location.subfolder='FirstSampleOutput';
location.subfolder='SecondSampleOutput';



%% 3.b settings 
% .settingsFile: name of the settings file to load 
%                if left empty default name is *settings.m* 
location.settingsFile=[]; 
% =========================================================================
modeFinderMain; 




